/*	Copyright 2007 - Xavier Baro (xbaro@cvc.uab.cat)

	This file is part of eapmlib.

    Eapmlib is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or any 
	later version.

    Eapmlib is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __IMAGE_DATA_H__
#define __IMAGE_DATA_H__

#include "EvolutiveLib.h"
#include "Data.h"

namespace Evolutive {

	class EVOLUTIVELIB_API CImageData : public CData
	{
		//! Methods
	public:
		//! Default constructor		
		CImageData(void);

		//! Default destructor
		virtual ~CImageData(void);		

#ifdef USE_OPENCV
		//! Constructor from an image
		CImageData(IplImage *Image);	

		//! Returns the  image
		IplImage *GetImage(void);

		//! Set a region of interest
		void SetROI(CvRect ROI);

		//! Returns a pointer to the region of interest
		CvRect* GetROI(void);

		//! Remove the ROI
		void ResetROI(void);

		//! Returns the offset over the image
		int GetOffset(void);

		//! Sets the scale value
		void SetScale(double Scale);
		
		//! Returns the scale value
		double GetScale(void);

#endif// USE_OPENCV								
	protected:
					
		//! Attributes
	protected:				

		//! Region of interest
		CvRect *m_ROI;	

		//! Scale value
		double m_Scale;
	};	
}

#endif // __IMAGE_DATA_H__
